package com.xuxin.baby.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.xuxin.baby.R;
import com.xuxin.baby.bean.ChildDataBean;
import com.xuxin.baby.utils.BaseUtils;

import org.jetbrains.annotations.NotNull;

/**
 * Created by xu_xin
 * Created on 2020.08.04 0004
 * 记身高
 */
public class ChildDataAdapter extends BaseQuickAdapter<ChildDataBean.ResultBean.ItemsBean, BaseViewHolder> {

    public ChildDataAdapter() {
        super(R.layout.item_child_data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, ChildDataBean.ResultBean.ItemsBean itemsBean) {
        String name = itemsBean.getHeight() + "cm; " + itemsBean.getWeight() + "kg; " + itemsBean.getHeadCirc() + "cm";
        holder.setText(R.id.item_child_data_name, name);
        holder.setText(R.id.item_child_data_time, BaseUtils.getTime(itemsBean.getEventDate()));
    }
}